﻿using System;
using System.Collections.Generic;
using System.Text;

namespace mark
{
    class strwork
    {
        public string between(string htmlstr, string s1, string s2,ref int startloc, int adding)
        {
            int i, start, end;
            string s = null;
            i = htmlstr.IndexOf(s1, startloc);
            
            if (i != -1)
            {
                start = i + s1.Length + adding;
                end = htmlstr.IndexOf(s2, start);
                s = htmlstr.Substring(start, end - start);
                startloc = end;
            }

            return s;

        }
    }
    class mytyme
    {
        public String time()
        {
            DateTime currtime = DateTime.Now;
            return currtime.Hour.ToString();
        }

        public DateTime str_time(string s)
        {
            DateTime d = new DateTime();
            string s1, s2;
           // s1 = s[0] + s[1];
           // s2 = s[3] + s[4];
            d= Convert.ToDateTime(s);
            //d.Minute = Convert.ToInt32(s2);
            return d;
        }

    }
}
